#pragma once

#include "checker_piece.h"

typedef enum {STANDSTILL=0, UP=1, DOWN=2, LEFT=4, RIGHT=8, UP_LEFT=UP|LEFT, UP_RIGHT=UP|RIGHT, DOWN_LEFT=DOWN|LEFT, DOWN_RIGHT=DOWN|RIGHT} PIECE_DIRECTION;

class checker_direction
{
public:
	static PIECE_DIRECTION get(COORD from_x, COORD from_y, COORD to_x, COORD to_y)
	{
		int d = 0;

		d |= (to_x > from_x)? RIGHT : LEFT;
		d |= (to_y > from_y)? UP : DOWN;

		return (PIECE_DIRECTION) d;
	}
};
